<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::post('upload', 'Index@upload')->name('admin.upload');
Route::get('/home', 'Admin\Index@index')->name('admin.index');
Route::get('/profile', 'Admin\Index@profile')->name('admin.profile');
Route::get('/password', 'Admin\Index@password')->name('admin.password');
Route::get('/password', 'Admin\Index@password')->name('admin.password');
Route::group([
    'prefix' => 'admin',
    'namespace' => 'Admin',
], function (){
    Route::get('/', 'Index@index')->name('admin.index');
    Route::get('profile', 'Index@profile')->name('admin.profile');
    Route::get('password', 'Index@password')->name('admin.password');
    Route::get('config/{tab}', 'Config@index')->name('admin.config');

    // 分类
    Route::get('category/index', 'Category@index')->name('admin.category.index');
    Route::get('category/create', 'Category@create')->name('admin.category.create');

    // 文章
    Route::get('article/index', 'Article@index')->name('admin.article.index');
    Route::get('article/create', 'Article@create')->name('admin.article.create');

    // 标签
    Route::get('tag/index', 'Tag@index')->name('admin.tag.index');
    Route::get('tag/create', 'Tag@create')->name('admin.tag.create');

    // 链接
    Route::get('link/index', 'Link@index')->name('admin.link.index');
    Route::get('link/create', 'Link@create')->name('admin.link.create');

    // 页面
    Route::get('page/index', 'Page@index')->name('admin.page.index');
    Route::get('page/create', 'Page@create')->name('admin.page.create');

    // 用户
    Route::get('user/index', 'User@index')->name('admin.user.index');
    Route::get('user/create', 'User@create')->name('admin.user.create');

    // 角色
    Route::get('role/index', 'Role@index')->name('admin.role.index');
    Route::get('role/create', 'Role@create')->name('admin.role.create');

    // 评论
    Route::get('comment/index', 'Comment@index')->name('admin.comment.index');


});
